package org.example.mulitithreading.ex3;

public class MyThread1 extends Thread{
    @Override
    public void run() {
        while (true){
            try{
                Money.lock.lock();
                if(Money.money != 100000) {
                    System.out.println("钱已经不是十万了");
                    break;
                }
            } finally {
                Money.lock.unlock();
            }
        }
    }
}
